Re: XML and PostgreSQL - Mailing list pgsql-general

From Elaine Lindelef
Subject Re: XML and PostgreSQL
Date
Msg-id v04210108b9a54f5cdb60@[172.16.2.101]
Whole thread Raw
In response to XML and PostgreSQL  (Dan Ostrowski <dan@triad-dev.com>)
List pgsql-general
>I am wondering if any of you work with XML-PostgreSQL extensively.
>
>I usually do presentations in HTML for web stuff, but I am now about to
>embark on a large ( for me ) project with potentially many layers of
>presentation and data manipulation.
>
>I am wondering how well PostgreSQL deals with XML and whether, in your
>optinions, it is worth trying to learn a decent amount of XML to
>accomodate this project. It's going to be quite long anyhow, since i am
>doing it pretty much pro-bono and by myself, so a little research
>time might be alright if the advantages are great enough.
>
>thoughts?
>
>regards,
>dan

I consider XML to be rather a mixed bag. The idea is very powerful,
and very useful. The standard as it's evolving is almost becoming too
complex to be useful.

We work with XML extensively as part of an interchange format.
However, if I was building my own application that would not be
communicating with other people outside my control I would not use
strict XML but instead an XML-like construct.

True XML is an enemy of concise and rational data design. It can get
rather ridiculous with the possible levels of data... where a simple
title might need to have 0 to 4 pieces of assorted metadata about it
(language, country, etc) and where you have to accomodate possible
multiple titles per item even though in practice you'll never want
more than one title. Each of these fields ends up needing its own
table, which makes for a huge explosion of data tables. (This is
where I miss PostgreSQL's lack of database "users" as is available in
Oracle and MySQL.) If you have control over the XML that needs to go
in and out of your database, these problems can be ignored in places
which makes XML quite a bit more interesting.

XML can be used to exchange data with a Flash front end, which is convenient.

I don't find XML useful for data manipulation. And I don't see really
that XML has an advantage over a SQL database in terms of splitting
data presentation layers from data: the database is infinitely more
flexible, rational, and comprehensible. XML is useful as a step past
tab-delimited files for sharing data between systems.

My feeling is that there is not really good support for
XML-PostgreSQL connections yet, but that this is similarly true for
other databases. There are libraries in Perl and the like that can be
used to put it together.

So, as always: it depends on your application. ;^)

Elaine Lindelef


pgsql-general by date:

Previous
From: greg@turnstep.com
Date:
Subject: Re: psql: \pset pager 'always'?
Next
From: Francisco J Reyes
Date:
Subject: Re: pg_dumpall between Linux and FreeBSD.